package com.jinxi.web.util;

public class ResultMessage<T> {

	private Result result = Result.OK;
	private String message = "";
	private T object;

	public ResultMessage(Result result) {
		super();
		this.result = result;
	}

	public ResultMessage(Result result, String message) {
		super();
		this.result = result;
		this.message = message;
	}

	public ResultMessage(Result result, T object) {
		super();
		this.result = result;
		this.object = object;
	}

	public String getResult() {
		return result.toString();
	}

	public void setResult(Result result) {
		this.result = result;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public T getObject() {
		return object;
	}

	public void setObject(T object) {
		this.object = object;
	}

	public enum Result {
		OK("OK"), ERROR("ERROR");

		private String rs;

		Result(String rs) {
			this.rs = rs;
		}

		@Override
		public String toString() {
			return rs;
		}
	}

}
